import service from '@/utils/request'

const url = {
  //获取评论列表
  getList: '/comment/list',
  //点赞回答
  likeAnswer: '/comment/like',
  //回复
  reply: '/comment/reply'
}

export const Comment = {
  getList: function (params) {
    return service({
      url: url.getList,
      method: 'get',
      params
    })
  },
  likeAnswer: function (data) {
    return service({
      url: url.likeAnswer,
      method: 'post',
      data
    })
  },
  reply: function (data) {
    return service({
      url: url.reply,
      method: 'post',
      data
    })
  }
}
